#pragma once
#include "dllmain.h"
#include <string>

#if defined(_WIN32) || defined(WIN32)

BEGIN_NAMESPACE_CPPX

class _CPPX_API fuStringEncoder
{
public:
	static std::string  UnicodeToUtf8( const std::wstring & s );
	static std::wstring Utf8ToUnicode( const std::string & s );

	static std::string  UnicodeToAnsi(const wchar_t * pwszSrc);
    static std::wstring AnsiToUnicode(const char * pszSrc, int nLen);

    static std::string  UnicodeToAnsi(const std::wstring & ws){
        return UnicodeToAnsi(ws.c_str());
    }
    static std::wstring AnsiToUnicode(const std::string & s){
        return AnsiToUnicode(s.c_str(),(int)s.size());
    }

    static std::string  AnsiToUtf8(const std::string & s);
    static std::string  Utf8ToAnsi(const std::string & s);
};

END_NAMESPACE_CPPX

#endif
